// 直接在内部
// 14% slower
var fn1 = function () {
  this.foo = function () {
    console.log(11111)
  }
}

let fn = new fn1()

// 原型链
var fn2 = function () {}
fn2.prototype.foo = function () {
  console.log(11111)
}
let fn2 = new fn2()
